<template>
  <div class>
    <input type="text" :value="sonVal" @input="handleModel" />
  </div>
</template>

<script type="text/javascript">
export default {
  name: "",
  props: {
    value: {
      type: String,
      defalut() {
        return "";
      }
    }
  },
  data() {
    return {
      sonVal:this.value
    };
  },
  watch: {
    value(newval) {
      this.sonVal = newval
    }
  },
  methods:{
    handleModel(e){
        this.sonVal = e.target.value
        this.$emit('input',this.sonVal)
    }
  }
};
</script>

